<template>
  <div class="dashboard">
    <!-- 欢迎区域 -->
    <div class="welcome-section">
      <div class="welcome-content">
        <div class="welcome-text">
          <h1 class="welcome-title">{{ welcomeMessage }}</h1>
          <p class="welcome-subtitle">今天是 {{ currentDate }}，祝您工作愉快</p>
        </div>
        <div class="welcome-actions">
          <router-link to="/documentList">
            <el-button type="primary" size="large" class="quick-action-btn" >
              <el-icon><Upload /></el-icon>
              &emsp13; 快速上传
            </el-button>
          </router-link>
          <router-link to="/userView">
            <el-button size="large" class="quick-action-btn">
              <el-icon><User /></el-icon>
              &emsp13; 个人中心
            </el-button>
          </router-link>
          <el-button size="large" class="quick-action-btn" @click="redirectToMobile">
            <el-icon><Service /></el-icon>
            &emsp13; AI对话
          </el-button>
        </div>
      </div>
    </div>

    <!-- 顶部统计卡片 -->
    <el-row :gutter="24" class="stats-header">
      <el-col :xs="24" :sm="12" :md="6" v-for="(stat, idx) in stats" :key="idx">
        <el-card class="stat-card" :class="`stat-card-${idx + 1}`">
          <div class="stat-content">
            <div class="stat-info">
              <p class="stat-title">{{ stat.title }}</p>
              <div class="stat-value-wrap">
                <span class="stat-value">{{ stat.value }}</span>
                <el-tooltip effect="dark" content="查看详情">
                  <el-icon class="info-icon" size="16">
                    <InfoFilled />
                  </el-icon>
                </el-tooltip>
              </div>
              <p class="stat-change" :class="stat.trendClass">
                <el-icon class="trend-icon">
                  <component :is="stat.trendIcon" />
                </el-icon>
                {{ stat.changeDesc }}
              </p>
            </div>
            <div class="stat-icon">
              <el-icon :size="32">
                <component :is="stat.icon" />
              </el-icon>
            </div>
          </div>
        </el-card>
      </el-col>
    </el-row>

    <!-- 核心内容区域 -->
    <div class="main-content">
      <!-- 左侧用户分析 -->
      <el-card class="analysis-card user-analysis-card">
        <div class="chart-header">
          <div class="chart-title">
            <h3>用户行为分析</h3>
            <p class="chart-subtitle">最近30天的用户活跃度趋势</p>
          </div>
          <el-button type="text" size="small" class="more-btn">
            查看更多
            <el-icon><ArrowRight /></el-icon>
          </el-button>
        </div>
        <div ref="barChart" class="bar-chart" style="height: 240px;"></div>
        <div class="user-overview">
          <h4>用户概述</h4>
          <p class="growth-info">比上周 <span :class="userGrowthClass">+23%</span></p>
          <p class="desc">我们为您创建了多个选项，可将它们组合在一起并定制为像素完美的页面</p>
          <div class="stats-grid">
            <div class="stat-item" v-for="(item, idx) in userStats" :key="idx">
              <span class="item-value">{{ item.value }}</span>
              <span class="item-label">{{ item.label }}</span>
            </div>
          </div>
        </div>
      </el-card>

      <!-- 右侧访问量分析 -->
      <el-card class="analysis-card visit-analysis-card">
        <div class="chart-header">
          <div class="chart-title">
            <h3>访问量趋势</h3>
            <p class="chart-subtitle">系统访问量统计与分析</p>
          </div>
          <span class="growth-tag" :class="visitGrowthClass">
            今年增长 {{ visitGrowth }}%
          </span>
        </div>
        <div ref="lineChart" class="line-chart" style="height: 320px;"></div>
        <div class="visit-footer">
          <div class="footer-stats">
            <div class="footer-stat">
              <span class="stat-label">今日访问</span>
              <span class="stat-value">1,234</span>
            </div>
            <div class="footer-stat">
              <span class="stat-label">本周访问</span>
              <span class="stat-value">8,567</span>
            </div>
            <div class="footer-stat">
              <span class="stat-label">本月访问</span>
              <span class="stat-value">32,456</span>
            </div>
          </div>
        </div>
      </el-card>
    </div>

    <!-- 快速操作区域 -->
    <div class="quick-actions">
      <el-card class="quick-actions-card">
        <div class="actions-header">
          <h3>快速操作</h3>
          <p>常用功能快速访问</p>
        </div>
        <div class="actions-grid">
          <div class="action-item" v-for="(action, idx) in quickActions" :key="idx" @click="handleQuickAction(action)">
            <div class="action-icon">
              <el-icon :size="24">
                <component :is="action.icon" />
              </el-icon>
            </div>
            <div class="action-content">
              <h4>{{ action.title }}</h4>
              <p>{{ action.description }}</p>
            </div>
          </div>
        </div>
      </el-card>
    </div>
  </div>
</template>

<script setup>
import { ref, onMounted, computed } from 'vue';
import * as echarts from 'echarts';
import { useAdminStore } from '@/stores/admin';
import { 
  InfoFilled, 
  Upload, 
  User, 
  ArrowRight,
  Service
} from '@element-plus/icons-vue'; 
import router from '@/router';
// import loginVue from '../../../uniapp/src/pages/login/login.vue';

const adminStore = useAdminStore()

// 当前日期
const currentDate = computed(() => {
  return new Date().toLocaleDateString('zh-CN', {
    year: 'numeric',
    month: 'long',
    day: 'numeric',
    weekday: 'long'
  });
});

// 当前用户信息
computed(() => adminStore.user)
const welcomeMessage = computed(() => {
  const userName = adminStore.userName
  return `欢迎回来，${userName}！`
})

// 统计卡片数据
const stats = ref([
  {
    title: '总访问次数',
    value: '9,120',
    icon: 'View',
    changeDesc: '较上周 +20%',
    trendClass: 'up',
    trendIcon: 'ArrowUp'
  },
  {
    title: '在线访客数',
    value: '182',
    icon: 'User',
    changeDesc: '较上周 +10%',
    trendClass: 'up',
    trendIcon: 'ArrowUp'
  },
  {
    title: '文档总数',
    value: '1,234',
    icon: 'Document',
    changeDesc: '较上周 +15%',
    trendClass: 'up',
    trendIcon: 'ArrowUp'
  },
  {
    title: '系统通知',
    value: '12',
    icon: 'Bell',
    changeDesc: '较上周 -5%',
    trendClass: 'down',
    trendIcon: 'ArrowDown'
  }
]);

// 用户统计数据
const userStats = ref([
  { value: '1,234', label: '活跃用户' },
  { value: '567', label: '新增用户' },
  { value: '89%', label: '用户满意度' },
  { value: '2.3h', label: '平均使用时长' }
]);

// 快速操作
const quickActions = ref([
  {
    title: '上传文档',
    description: '快速上传和管理文档',
    icon: 'Upload',
    action: 'documentList'
  },
  {
    title: '知识库管理',
    description: '管理知识库和分类',
    icon: 'Document',
    action: 'knowledgeBase'
  },
  {
    title: '用户管理',
    description: '查看和管理用户信息',
    icon: 'User',
    action: 'userView'
  },
  {
    title: '系统设置',
    description: '配置系统参数',
    icon: 'Setting',
    action: 'settings'
  }
]);

// 访问量增长
const visitGrowth = ref(15);
const visitGrowthClass = computed(() => {
  return visitGrowth.value > 0 ? 'positive' : 'negative';
});

const userGrowthClass = computed(() => {
  return 'positive';
});

// 图表引用
const barChart = ref(null);
const lineChart = ref(null);

// 处理快速操作
const handleQuickAction = (action) => {  
  // 添加路由跳转逻辑
  router.push(`/${action.action}`);
};

// 初始化图表
const initCharts = () => {
  // 柱状图
  if (barChart.value) {
    const barChartInstance = echarts.init(barChart.value);
    const barOption = {
      tooltip: {
        trigger: 'axis',
        axisPointer: {
          type: 'shadow'
        }
      },
      grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
      },
      xAxis: {
        type: 'category',
        data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
        axisLine: {
          lineStyle: {
            color: '#e2e8f0'
          }
        },
        axisLabel: {
          color: '#64748b'
        }
      },
      yAxis: {
        type: 'value',
        axisLine: {
          lineStyle: {
            color: '#e2e8f0'
          }
        },
        axisLabel: {
          color: '#64748b'
        }
      },
      series: [
        {
          name: '活跃用户',
          type: 'bar',
          data: [120, 200, 150, 80, 70, 110, 130],
          itemStyle: {
            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
              { offset: 0, color: '#3b82f6' },
              { offset: 1, color: '#6366f1' }
            ])
          },
          borderRadius: [4, 4, 0, 0]
        }
      ]
    };
    barChartInstance.setOption(barOption);
  }

  // 折线图
  if (lineChart.value) {
    const lineChartInstance = echarts.init(lineChart.value);
    const lineOption = {
      tooltip: {
        trigger: 'axis'
      },
      grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
      },
      xAxis: {
        type: 'category',
        boundaryGap: false,
        data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月'],
        axisLine: {
          lineStyle: {
            color: '#e2e8f0'
          }
        },
        axisLabel: {
          color: '#64748b'
        }
      },
      yAxis: {
        type: 'value',
        axisLine: {
          lineStyle: {
            color: '#e2e8f0'
          }
        },
        axisLabel: {
          color: '#64748b'
        }
      },
      series: [
        {
          name: '访问量',
          type: 'line',
          smooth: true,
          data: [820, 932, 901, 934, 1290, 1330, 1320],
          itemStyle: {
            color: '#3b82f6'
          },
          areaStyle: {
            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
              { offset: 0, color: 'rgba(59, 130, 246, 0.3)' },
              { offset: 1, color: 'rgba(59, 130, 246, 0.1)' }
            ])
          }
        }
      ]
    };
    lineChartInstance.setOption(lineOption);
  }
};

// 跳转到移动端
const redirectToMobile = () => {
  // 从本地存储获取移动端URL（登录时存储）
  const mobileUrl = localStorage.getItem('mobileOriginUrl') || 'http://localhost:5173/'
  // 携带PC端的token返回（确保移动端能识别用户）
  const token = localStorage.getItem('pcToken')  
  window.location.href = `${mobileUrl}?pc_token=${token}`
}

onMounted(() => {
  initCharts();
});
</script>

<style scoped>
.dashboard {
  padding: 0;
}

/* 欢迎区域 */
.welcome-section {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.9) 0%, rgba(147, 51, 234, 0.9) 100%);
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 32px;
  color: #ffffff;
  box-shadow: 0 8px 32px rgba(0, 212, 255, 0.3);
  animation: neonGlow 3s ease-in-out infinite alternate;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 212, 255, 0.5);
  backdrop-filter: blur(20px);
}


.welcome-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.2), transparent);
  animation: neonSweep 4s ease-in-out infinite;
}

.welcome-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.welcome-title {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.welcome-subtitle {
  font-size: 16px;
  margin: 0;
  opacity: 0.9;
  color: rgba(255, 255, 255, 0.9);
}

.welcome-actions {
  display: flex;
  gap: 16px;
}

.quick-action-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: #ffffff;
  border-radius: 12px;
  transition: all 0.3s ease;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  position: relative;
  overflow: hidden;
}

.quick-action-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.3), transparent);
  animation: neonSweep 3s ease-in-out infinite;
}

.quick-action-btn:hover {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  border-color: rgba(0, 212, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4), 0 0 15px rgba(0, 212, 255, 0.3);
}

.quick-action-btn:hover::before {
  animation: neonSweepFast 1.5s ease-in-out infinite;
}

/* 统计卡片 */
.stats-header {
  margin-bottom: 32px;
}

.stat-card {
  border-radius: 16px;
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, rgba(0, 20, 40, 0.9) 0%, rgba(0, 40, 80, 0.9) 100%);
  border: 1px solid rgba(0, 212, 255, 0.3);
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.2);
  backdrop-filter: blur(20px);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #00d4ff 0%, #0099cc 100%);
  animation: neonBorder 2s ease-in-out infinite alternate;
}

.stat-card-1::before { 
  background: linear-gradient(90deg, #00d4ff 0%, #0099cc 100%); 
  animation: neonBorder 2s ease-in-out infinite alternate;
}
.stat-card-2::before { 
  background: linear-gradient(90deg, #2ed573 0%, #1e90ff 100%); 
  animation: neonBorder 2s ease-in-out infinite alternate 0.5s;
}
.stat-card-3::before { 
  background: linear-gradient(90deg, #ffa502 0%, #ff6348 100%); 
  animation: neonBorder 2s ease-in-out infinite alternate 1s;
}
.stat-card-4::before { 
  background: linear-gradient(90deg, #ff4757 0%, #c44569 100%); 
  animation: neonBorder 2s ease-in-out infinite alternate 1.5s;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 212, 255, 0.2);
  border-color: rgba(0, 212, 255, 0.6);
}

.stat-card:hover::before {
  animation: neonBorderFast 1s ease-in-out infinite alternate;
}

.stat-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.stat-info {
  flex: 1;
}

.stat-title {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 8px 0;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.stat-value-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.info-icon {
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.3s ease;
}

.info-icon:hover {
  color: #00d4ff;
}

/* 自定义tooltip样式 */
:deep(.el-tooltip__popper) {
  background: linear-gradient(135deg, rgba(0, 20, 40, 0.95) 0%, rgba(0, 40, 80, 0.95) 100%) !important;
  border: 1px solid rgba(0, 212, 255, 0.4) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3) !important;
  backdrop-filter: blur(20px) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
  font-weight: 500 !important;
}

:deep(.el-tooltip__popper .el-popper__arrow::before) {
  background: linear-gradient(135deg, rgba(0, 20, 40, 0.95) 0%, rgba(0, 40, 80, 0.95) 100%) !important;
  border: 1px solid rgba(0, 212, 255, 0.4) !important;
}

.stat-change {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  margin: 0;
  font-weight: 500;
}

.stat-change.up {
  color: #2ed573;
}

.stat-change.down {
  color: #ff4757;
}

.trend-icon {
  font-size: 12px;
}

.stat-icon {
  color: #00d4ff;
  opacity: 0.9;
}

/* 主要内容区域 */
.main-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.analysis-card {
  border-radius: 16px;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, rgba(0, 20, 40, 0.9) 0%, rgba(0, 40, 80, 0.9) 100%);
  border: 1px solid rgba(0, 212, 255, 0.3);
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.2);
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

.analysis-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(0, 212, 255, 0.1) 50%, transparent 70%);
  animation: neonScan 6s ease-in-out infinite;
  pointer-events: none;
}

.analysis-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 212, 255, 0.2);
  border-color: rgba(0, 212, 255, 0.6);
}

.analysis-card:hover::before {
  animation: neonScanFast 3s ease-in-out infinite;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.chart-title h3 {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 4px 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.chart-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.more-btn {
  color: #00d4ff;
  font-weight: 500;
  transition: all 0.3s ease;
}

.more-btn:hover {
  color: #0099cc;
  transform: translateX(4px);
}

.growth-tag {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.growth-tag.positive {
  background: rgba(46, 213, 115, 0.2);
  color: #2ed573;
  border: 1px solid rgba(46, 213, 115, 0.3);
}

.growth-tag.negative {
  background: rgba(255, 71, 87, 0.2);
  color: #ff4757;
  border: 1px solid rgba(255, 71, 87, 0.3);
}

.user-overview {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 212, 255, 0.3);
}

.user-overview h4 {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 8px 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.growth-info {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 8px 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.growth-info .positive {
  color: #2ed573;
  font-weight: 600;
}

.growth-info .negative {
  color: #ff4757;
  font-weight: 600;
}

.desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 16px 0;
  line-height: 1.6;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.stat-item {
  text-align: center;
  padding: 12px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.stat-item:hover {
  background: rgba(0, 212, 255, 0.2);
  border-color: rgba(0, 212, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.2);
}

.item-value {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.item-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.visit-footer {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 212, 255, 0.3);
}

.footer-stats {
  display: flex;
  justify-content: space-around;
}

.footer-stat {
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 4px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.stat-value {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 快速操作区域 */
.quick-actions {
  margin-bottom: 32px;
}

.quick-actions-card {
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(22, 33, 62, 0.95) 100%);
  border: 1px solid rgba(0, 212, 255, 0.2);
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.1);
  backdrop-filter: blur(20px);
}

.actions-header {
  margin-bottom: 24px;
}

.actions-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 4px 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.actions-header p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.action-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.action-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.action-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 212, 255, 0.3);
}

.action-content h4 {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 4px 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.action-content p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .main-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .welcome-content {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
  
  .welcome-title {
    font-size: 24px;
  }
  
  .welcome-actions {
    justify-content: center;
  }
  
  .stats-header {
    margin-bottom: 24px;
  }
  
  .actions-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .welcome-section {
    padding: 20px;
    border-radius: 16px;
  }
  
  .welcome-title {
    font-size: 20px;
  }
  
  .stat-value {
    font-size: 24px;
  }
  
  .action-item {
    padding: 16px;
  }
  
  .action-icon {
    width: 40px;
    height: 40px;
  }
}

/* 霓虹灯动画关键帧 */
@keyframes neonGlow {
  0% {
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.3);
  }
  100% {
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.6), 0 0 20px rgba(0, 212, 255, 0.4);
  }
}

@keyframes neonSweep {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

@keyframes neonSweepFast {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

@keyframes neonBorder {
  0% {
    opacity: 0.6;
    box-shadow: 0 0 5px rgba(0, 212, 255, 0.5);
  }
  100% {
    opacity: 1;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.8);
  }
}

@keyframes neonBorderFast {
  0% {
    opacity: 0.8;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
  }
  100% {
    opacity: 1;
    box-shadow: 0 0 20px rgba(0, 212, 255, 1);
  }
}

@keyframes neonScan {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

@keyframes neonScanFast {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}
</style>